﻿using DFGK_WMS.Model.Dto;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IPalletService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool AddPallet(Pallet dto,out string message);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool UpdPallet(Pallet dto, out string message);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool DelPallet(long id);

        /// <summary>
        /// 托盘分页查询
        /// </summary>
        /// <param name="name"></param>
        /// <param name="type"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<Pallet> GetPallets(string? name, int type, long incell, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 根据主键获取对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Pallet? GetPalletByid(long id);

        /// <summary>
        /// 根据类型查询
        /// </summary>
        /// <param name="palletType"></param>
        /// <returns></returns>
        List<Pallet> GetTypePallet(int palletType);

        /// <summary>
        /// 批量添加托盘
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddPalletList(BatchPalletDTO m, out string message);

        /// <summary>
        /// 判断托盘状态
        /// </summary>
        /// <param name="PalletCode"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool PalletVerify(string PalletCode, out string message);

    }
}
